﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Engine.Sgml.Merging;
using System.Diagnostics;
using System.Runtime.InteropServices;

namespace Engine.Sgml.Validation {
    [StructLayout(LayoutKind.Auto)]
    [DebuggerDisplay("{Ancestor} Blocks:{InconsistentBlocks.Count}")]
    internal struct BlockItem {
        public SElement Ancestor;
        public IList<InconsistentBlock> InconsistentBlocks;
        public bool AncestorUncompleted;
        public IList<SElement> CreatedElements;

        public bool HasCreatedElements() {
            return CreatedElements != null && CreatedElements.Count > 0;
            }

        public bool HasInconsistentBlocks() {
            return InconsistentBlocks != null && InconsistentBlocks.Count > 0;
            }
        }
    }
